Today's Question:  What does your personal desk look like?        GIVE A SHOUT

SEARCH KEYWORD -- Convert HTML to Wordpress



  Get hostname from a URL using JavaScript

Sometimes we may have strings which contain some UR;s and we may want to retrieve the hostname from the URLs for some statistic use. For example, we may have a URL : http://www.example.com/aboutus.html. We may want to retrieve the www.example.com from the URL. How? Use regular expression. Here I give an example using JavaScript. If you want to check whether a string is a URL or not. Refer to Detect URLs in a Block of Text. In JavaScript, we can have a regular expression like var pattern=/(.+:\/\...

   JavaScript,URL,regular expression, Hostname     2012-06-15 09:16:45

  An alternative way to parse URL in JavaScript

Normally when we need to process URL in JavaScript, we may use the location object. Then we can use location.hostname,location.href,location.port etc to get the information we need. In this post, we will parse an URL with an alternative way. We can use an URL to create a DOM object by calling document.createElement("a"). The complete code is: function parseURL(url) { var a = document.createElement('a'); a.href = url; return { source: url, protocol: a.protocol.replace(':',''), host: a.ho...

   URL,location,parse     2014-03-03 07:05:11

  Capture video stream with WebRTC

WebRTC(Web Real-Time Communication) is an API supporting real time audio and video communication through a browser. It is now a recommended W3C standard. This post is to show you how to capture video stream and screenshot with WebRTC. Capture video stream To play video stream from the video camera, we first need to put a video tag in our code: <video id="video"></video> The main function to get the video stream is the navigator.getUserMedia, as of now only few of the browsers support...

   WebRTC,Video,Screenshot     2013-10-24 21:04:41

  Google will launch new rendering engine Blink

Google announced new rendering engine Blink derived from the open source WebKit on Chromium project's official blog. This is to speed up the innovation and development process. It will take some time for Chrome to switch from Webkit to Blink.Opera has just switched to WebKit, what will they think about Google's move? Opera's Bruce Lawson said in a blog that Opera browser would use Blink engine and contribute to Blink community.For Google, a powerful rendering engine means that Chrome OS ca...

   Google,Blink,,Webkit,Render engine     2013-04-04 04:11:23

  Why my Website Contact form is not converting enough traffic?

Contact forms are a very common part of any website and anybody can overlook them. Generally people try to choose it as their first solution but they do not realize that they are actually hurting the growth of their business. WordPress currently power more than 66 million websites but it would be good if your website is existing because of one of the most popular Content Management Systems of the world. Everyone starting from blogger to the person sitting next door use this tool for making their...

   website contact form tutorial     2014-11-17 05:04:03

  2 million iPhone 5 sold in China in 3 days

Apple announces that since it was available in China from last Friday, iPhone 5 has been sold over 2 million units in 3 days. iPhone 5 was available for sale in China starting from 14th Dec, the price is 5288RMB and up, there are two cooperated vendors in China : China Telecom and China Unicom. They start sell iPhone 5 on their own sales channels, moreover Apple starts selling iPhone in their own Apple Store and official website. According to Tim Cook, because of the high demand of Apple product...

   iPhone 5, China, Sale     2012-12-17 12:27:59

  Show drop down list or menu above of a flash in webpage

How to make a drop down menu show above of a  flash in webpage?Normally when we embed a flash or swf file into our webpage, it is not one component of our webpage.So sometimes the flash will always show above of the webpage, it will not interact with our HTML page.To solve this problem,we need to use wmode property of object tag.wmode has three properties: window,opaque and transparent.window : the flash will show in its own rectangular window,which will not interact with    ...

   HTML,Flash,Block,Drop down menu,Solution     2012-03-12 17:13:57

  Some thoughts about Facebook native app

On Techcrunch Disrupt last month, Facebook CEO Mark Zuckerberg's remarks about their mobile app sparked a denunciation against Web App. HTML 5 seems to have become the bottleneck of poor experience of all related mobile applications. From the user perspective, Facebook native iOS App rates from the 1.5 star to four star now; since the introduction of new native app, the user usage is doubled. It's not easy to have a huge rise of user usage for such a big app like Facebook. Especially consid...

   Facebook, Native app, Analysis     2012-10-12 20:38:11

  iWatch is coming to us before 2014

There are a variety of rumors around Apple iWatch. But according to Bloomberg,  Apple's smart watch is expected to be on sale at the end of this year.It is reported that iWatch might have phone and location tracking capabilities, it will also have a built-in pedometer and some health monitoring sensors. Previously Apple supplier and Gorilla Glass manufacturer Corning said that iWatch would be available only after at least 3 years. But recently Apple retained some iWatch related patents, it...

   iWatch,Apple,Google Glass     2013-03-04 18:09:42

  Understanding JavaScript closure and where it can be used

Closure The official definition of closure is: an expression (usually a function) that has many variables and is bound to an environment that includes those variables. In JavaScript, closure refers to the ability of a function to access the lexical scope in which it was defined, even after the function has been executed and left that scope. This ability is due to the fact that when a function is created, it generates a closure that includes a reference to the definition environment of the curr...

   CLOSURE,JAVASCRIPT,USAGE     2023-03-05 02:17:08